﻿<%@ Page Title="" Language="C#" MasterPageFile="~/acpMaster.Master" AutoEventWireup="true"
    CodeBehind="Test.aspx.cs" Inherits="ACP.Web.UI.Test" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeaderContent" runat="server">
    <style type="text/css">
        .CountDownPanel
        {
            color: yellow;
            background-color: black;
            font-size: 24px;
        }
    </style>
    <script type="text/javascript">
        function getSelectedItem() {
            var options = document.getElementById('tdOptions').getElementsByTagName("input");
            //alert(document.getElementById('<%=hdnQuestionSerialNo.ClientID %>').value);

            for (var i = 0; i < options.length; i++) {
                if (options[i].checked) {

                }
            }

            if (options.length > 0) {
                //alert(options[0].value);
            }
        }
    </script>
    <%--<script type="text/javascript">
    var macAddress = "";
    var ipAddress = "";
    var computerName = "";
    var wmi = GetObject("winmgmts:{impersonationLevel=impersonate}");
    e = new Enumerator(wmi.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True"));
    for (; !e.atEnd(); e.moveNext()) {
        var s = e.item();
        macAddress = s.MACAddress;
        ipAddress = s.IPAddress(0);
        computerName = s.DNSHostName;
    } 
</script>--%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMain" runat="server">
<div class="middleContent">
    <div class="timerBlock">
        <asp:Timer runat="server" ID="UpdateTimer" Interval="1000" OnTick="UpdateTimer_Tick" />
        <asp:UpdatePanel runat="server" ID="TimedPanel" UpdateMode="Conditional">
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="UpdateTimer" EventName="Tick" />
            </Triggers>
            <ContentTemplate>
                <asp:Label runat="server" ID="DateStampLabel" CssClass="CountDownPanel" />
            </ContentTemplate>
        </asp:UpdatePanel>
    </div><div>
    <asp:Label runat="server" ID="lblAlertMessage"></asp:Label></div>
    <div class="middlepart">
        <div class="testBlock">
            
            <asp:UpdatePanel runat="server" ID="udpQuestions" UpdateMode="Conditional">
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="btnPrevious" EventName="Click" />
                    <asp:AsyncPostBackTrigger ControlID="btnNext" EventName="Click" />
                </Triggers>
                <ContentTemplate>
                    <div class="TestQuestionBlock">
                        <table width="650px" border="0">
                            <tr>
                                <td valign="top" id="tdOptions" style="padding: 15px;">
                                    <asp:HiddenField ID="hdnQuestionSerialNo" runat="server" />
                                    <asp:PlaceHolder ID="plcQuestionAnswer" runat="server"></asp:PlaceHolder>
                                    <asp:Panel ID="pnlRadioOptions" runat="server" Visible="false">
                                        <asp:RadioButtonList ID="rdbOptions" runat="server" RepeatDirection="Vertical">
                                        </asp:RadioButtonList>
                                    </asp:Panel>
                                    <asp:Panel ID="pnlChkOptions" runat="server" Visible="false">
                                        <asp:CheckBoxList ID="chkOptions" runat="server" RepeatDirection="Vertical">
                                        </asp:CheckBoxList>
                                    </asp:Panel>
                                </td>
                            </tr>
                        </table>
                        <div class="testButtonBlock">
                            <asp:Button ID="btnPrevious" runat="server" Text="Previous" OnClick="btnPrevious_Click"
                                OnClientClick="getSelectedItem();" class="button-blue" />
                            <asp:Button ID="btnNext" class="button-blue" runat="server" Text="Next" OnClick="btnNext_Click"
                                OnClientClick="getSelectedItem();" />
                            
                        </div>
                        </tr>
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    
    </div>
    <div class="finishbutton">
    <asp:Button ID="btnFinish" class="button-finish" runat="server" Text="Finish" OnClientClick="return confirm('Do you want to finish the exam?')"
                                OnClick="btnFinish_Click" /></div>
     <div class="spacer">
    </div>
    </div>
    
   
    

</asp:Content>
